#pragma once
template<class Iterator,class Ref,class Ptr>
struct ReverseIterator {
	typedef ReverseIterator<Iterator, Ref, Ptr> self;
	Iterator cur;
	ReverseIterator(Iterator it)
		:cur(it) 
	{}
	self& operator++()
	{
		--cur;
		return *this;
	}
	self& operator*()
	{
		self tmp = cur;
		--tmp;
		return *tmp;
	}
	bool operator!=(const self& s)
	{
		return cur != s.cur;
	}
	bool ooperator == (const self & s)
	{
		return cur == s.cur;
	}
};
